package com.example.homelicaisystem.dao;

import com.example.homelicaisystem.entity.DTO.FamilyDTO;
import com.example.homelicaisystem.entity.DTO.IncomeDetailDTO;
import com.example.homelicaisystem.entity.IncomeDetail;
import com.example.homelicaisystem.entity.VO.IncomeDetailVO;
import com.example.homelicaisystem.entity.SelectResult;
import com.github.pagehelper.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface IncomeDetailMapper {
    boolean idExists(@Param("id") Integer id);

    void insertIncomeDetail(IncomeDetail data);

    void update(IncomeDetail data);

    void delete(int id);

    List<IncomeDetailVO> getList();

    Page<IncomeDetail> getList(IncomeDetail data);

    List<SelectResult> selectIncomeType();

    List<SelectResult> selectIncomeMode();

    IncomeDetail getIncomeDetailById(int id);

    List<IncomeDetail> censusByMode(FamilyDTO data);
}
